package bupt.party.online.model;

import java.sql.Timestamp;

/**
 * BranchNews entity. @author MyEclipse Persistence Tools
 */

public class BranchNews implements java.io.Serializable {

	// Fields

	private Integer id;
	private String title;
	private String posterNo;
	private Timestamp posterTime;
	private String modifyNo;
	private Timestamp modifyTime;
	private String content;
	private Integer tag;
	private Integer isDelete;
	private Integer visitedCount;
	private Integer branchId;
	// Constructors

	/** default constructor */
	public BranchNews() {
	}

	/** minimal constructor */
	public BranchNews(String title, Integer isDelete) {
		this.title = title;
		this.isDelete = isDelete;
	}

	/** full constructor */
	public BranchNews(String title, String posterNo, Timestamp posterTime,
			String modifyNo, Timestamp modifyTime, String content, Integer tag,
			Integer isDelete) {
		this.title = title;
		this.posterNo = posterNo;
		this.posterTime = posterTime;
		this.modifyNo = modifyNo;
		this.modifyTime = modifyTime;
		this.content = content;
		this.tag = tag;
		this.isDelete = isDelete;
	}

	// Property accessors

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getPosterNo() {
		return this.posterNo;
	}

	public void setPosterNo(String posterNo) {
		this.posterNo = posterNo;
	}

	public Timestamp getPosterTime() {
		return this.posterTime;
	}

	public void setPosterTime(Timestamp posterTime) {
		this.posterTime = posterTime;
	}

	public String getModifyNo() {
		return this.modifyNo;
	}

	public void setModifyNo(String modifyNo) {
		this.modifyNo = modifyNo;
	}

	public Timestamp getModifyTime() {
		return this.modifyTime;
	}

	public void setModifyTime(Timestamp modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getTag() {
		return this.tag;
	}

	public void setTag(Integer tag) {
		this.tag = tag;
	}

	public Integer getIsDelete() {
		return this.isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Integer getVisitedCount() {
		return visitedCount;
	}

	public void setVisitedCount(Integer visitedCount) {
		this.visitedCount = visitedCount;
	}
	
	public Integer getBranchId() {
		return branchId;
	}

	public void setBranchId(Integer branchId) {
		this.branchId = branchId;
	}

	public static String getNewsCategory(int tag){
		if(tag == 1) return "支部公告";
		if(tag == 2) return "支部活动";
		return "";
	}
}